unit uDataMain;

{$mode objfpc}{$H+}

interface

uses
    Classes, sqlite3conn, sqldblib, Controls, sqldb,
    uPictureList;

type

    { TDtaMain }

    TDtaMain = class(TDataModule)
        Conn: TSQLite3Connection;
        ImageList1: TImageList;
        LibLoader: TSQLDBLibraryLoader;
    private
        FPictures: TPictureList;
        procedure SetPictures(AValue: TPictureList);
        function AddConnection(const ACode: string): TSQLConnection;
        function GetConnection(const ACode: string): TSQLConnection;
        { private declarations }
    public
        function GetQuery(const ASQL: string): TSQLQuery;
        function ExecuteQuery(const ASQL: string): string;

        property Pictures: TPictureList read FPictures write SetPictures;
    end;

var
    DtaMain: TDtaMain;

implementation

{$R *.lfm}

{ TDtaMain }

procedure TDtaMain.SetPictures(AValue: TPictureList);
begin
    if FPictures = AValue then
        Exit;
    FPictures := AValue;
end;

function TDtaMain.AddConnection(const ACode: string): TSQLConnection;
begin

end;

function TDtaMain.GetConnection(const ACode: string): TSQLConnection;
begin

end;

function TDtaMain.GetQuery(const ASQL: string): TSQLQuery;
begin
    Result := TSQLQuery.Create(nil);
    Result.DataBase := Conn;
    Result.SQL.Text := ASQL;
end;

function TDtaMain.ExecuteQuery(const ASQL: string): string;
begin

end;

end.
